Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 4 - Advanced Printing Features / Advanced Printing Features Reference
Functions / Color Profile Functions


GXFindFormatProfile

You can use the GXFindFormatProfile function to determine color-matching information for a specific format object. This function is similar to the GXFindPrinterProfile function (described in the previous section), except that it finds a color profile that is associated with a format object rather than a printer object.

OSErr GXFindFormatProfile (gxFormat theFormat,
            void *searchData, long index,
            gxColorProfile *returnedProfile, long *numProfiles);
theFormat
A reference to the format object.
searchData

A pointer to a block of data that is assumed to be a ColorSync searching block of type CMProfileSearchRecord. If this value is not nil, then the value of the index parameter must not be 0 if you want the search to take place.
If this value is nil, the value of the index parameter defines which profile is returned.
index
The index of the profile to return. If the value is 0, then the current profile is returned in the returnedProfile parameter.
If the value of this parameter is not 0, then the behavior this function depends on the value of the searchData parameter. If index is not 0 and searchData is nil, the indexed profile is returned in the returnedProfile parameter. If index is not 0 and searchData is not nil, then the printer profiles are searched.
returnedProfile
On return, a list of references to color profiles matching the criteria specified by the searchData and index parameters. If no color profiles are found, this parameter returns nil.
numProfiles
On return, the number of profiles that were found.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
The GXFindFormatProfile function searches for a color profile that matches the specifications in the searchData and index parameters.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
The gxFindFormatProfile message that determines which profiles are returned is described in Inside Macintosh: QuickDraw GX Printing Extensions and Drivers.

Color matching, color profiles, the CMProfileSearchRecord structure, and color profile resources are described in Inside Macintosh: Advanced Color Imaging.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help